//
//  ByViewRegisterStep.m
//  oc_knowledge
//
//  Created by justiOS on 17/1/16.
//  Copyright © 2017年 com.itboye. All rights reserved.
//

#import "ByViewRegisterStep.h"

@implementation ByViewRegisterStep
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
    }
    [self createViews];
    return self;
}


- (void)createViews {
    
    CGFloat w = self.width / 3;
    NSArray *titleAry = @[@"1.输入手机号",@"2.输入验证码",@"3.设置密码"];
    
    for (NSInteger i = 0; i < 3; i ++) {
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10 + w*i, 0, w - 20 - 10, self.height)];
        label.text = titleAry[i];
        label.font = FONT(14);
        label.adjustsFontSizeToFitWidth = YES;
        label.tag = i + 10;
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(w - 17 + w*i, self.height / 2 - 6, 12, 12)];
        imageView.image = [UIImage imageNamed:@"Register_rightArrow"];
        [self addSubview:label];
        [self addSubview:imageView];
    }

}
- (void)setStep:(RegisterStep)step {

    UILabel *label = [self viewWithTag:step + 10];
    label.textColor = BY_THEME_COLOR;
}



@end
